<template>
  <el-col :span="24">
    <el-col :span="24" class="org-tree-show" >
        
         <OrgTree  :orgData="orgData" />
    </el-col>
   
  </el-col>
</template>

<script>
import ListSearchParams from '@/components/listSearchParams'
import TableAndButton from "@/components/TableAndButton";
import fetchRoleList from '@/api/system'
import OrgTree from '@/components/orgTree'
import data from '../const'
export default {
    components:{ListSearchParams,TableAndButton,OrgTree},
  data(){
      return {
          data,
          tableKey:3,
          list:[],
          orgData:[{
            id: 0,
          label: '祖节点',
          children: [{
          id: 1,
          label: '一级 1',
          children: [{
            id: 4,
            label: '二级 1-1',
            children: [{
              id: 9,
              label: '三级 1-1-1'
            }, {
              id: 10,
              label: '三级 1-1-2'
            }]
          }]
        }, {
          id: 2,
          label: '一级 2',
          children: [{
            id: 5,
            label: '二级 2-1'
          }, {
            id: 6,
            label: '二级 2-2'
          }]
        }, {
          id: 3,
          label: '一级 3',
          children: [{
            id: 7,
            label: '二级 3-1'
          }, {
            id: 8,
            label: '二级 3-2'
          }]
        }]

        }]
      }
  },
  methods:{
    handleFilter(args) {
      this.listQuery.page = 1
      this.getList()
    },
     getList(args) {
      // this.listLoading = true
      fetchRoleList(args).then(response => {
        this.list = response.data.items
        this.total = response.data.total
        this.listLoading = false
        // Just to simulate the time of the request
      })
    },
  }
}
</script>

<style lang="scss">
.org-tree-show{
    background: #F6F8FA;
}
.equipment-detail-button{
   border-bottom: 2px solid #E5E5E5;
   padding:10px 0;
}
</style>